package com.tom.imooc.staticdatasource;

/**
 * @Author Tim
 * @Description:
 * @Version 1.0
 */
public class DataSourceContext {

    private static final ThreadLocal<String> DB = new ThreadLocal<>();

    public static String getCurrentDb() {
        return DB.get();
    }

    public static void setCurrentDb(String db) {
        DB.set(db);
    }

    public static void removeCurrentDb() {
        DB.remove();
    }


}
